Optimal. Leaf size=200 \[ 128 a^8 x-\frac {128 i a^8 \log (\cos (c+d x))}{d}-\frac {64 a^8 \tan (c+d x)}{d}+\frac {4 i a^3 (a+i a \tan (c+d x))^5}{5 d}+\frac {i a^2 (a+i a \tan (c+d x))^6}{3 d}+\frac {i a (a+i a \tan (c+d x))^7}{7 d}+\frac {16 i a^2 \left (a^2+i a^2 \tan (c+d x)\right )^3}{3 d}+\frac {2 i \left (a^2+i a^2 \tan (c+d x)\right )^4}{d}+\frac {16 i \left (a^4+i a^4 \tan (c+d x)\right )^2}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.12, antiderivative size = 200, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 3, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3559, 3558,
3556} \begin {gather*} -\frac {64 a^8 \tan (c+d x)}{d}-\frac {128 i a^8 \log (\cos (c+d x))}{d}+128 a^8 x+\frac {16 i \left (a^4+i a^4 \tan (c+d x)\right )^2}{d}+\frac {4 i a^3 (a+i a \tan (c+d x))^5}{5 d}+\frac {i a^2 (a+i a \tan (c+d x))^6}{3 d}+\frac {16 i a^2 \left (a^2+i a^2 \tan (c+d x)\right )^3}{3 d}+\frac {2 i \left (a^2+i a^2 \tan (c+d x)\right )^4}{d}+\frac {i a (a+i a \tan (c+d x))^7}{7 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3556
Rule 3558
Rule 3559
Rubi steps
\begin {align*} \int (a+i a \tan (c+d x))^8 \, dx &=\frac {i a (a+i a \tan (c+d x))^7}{7 d}+(2 a) \int (a+i a \tan (c+d x))^7 \, dx\\ &=\frac {i a^2 (a+i a \tan (c+d x))^6}{3 d}+\frac {i a (a+i a \tan (c+d x))^7}{7 d}+\left (4 a^2\right ) \int (a+i a \tan (c+d x))^6 \, dx\\ &=\frac {4 i a^3 (a+i a \tan (c+d x))^5}{5 d}+\frac {i a^2 (a+i a \tan (c+d x))^6}{3 d}+\frac {i a (a+i a \tan (c+d x))^7}{7 d}+\left (8 a^3\right ) \int (a+i a \tan (c+d x))^5 \, dx\\ &=\frac {4 i a^3 (a+i a \tan (c+d x))^5}{5 d}+\frac {i a^2 (a+i a \tan (c+d x))^6}{3 d}+\frac {i a (a+i a \tan (c+d x))^7}{7 d}+\frac {2 i \left (a^2+i a^2 \tan (c+d x)\right )^4}{d}+\left (16 a^4\right ) \int (a+i a \tan (c+d x))^4 \, dx\\ &=\frac {16 i a^5 (a+i a \tan (c+d x))^3}{3 d}+\frac {4 i a^3 (a+i a \tan (c+d x))^5}{5 d}+\frac {i a^2 (a+i a \tan (c+d x))^6}{3 d}+\frac {i a (a+i a \tan (c+d x))^7}{7 d}+\frac {2 i \left (a^2+i a^2 \tan (c+d x)\right )^4}{d}+\left (32 a^5\right ) \int (a+i a \tan (c+d x))^3 \, dx\\ &=\frac {16 i a^5 (a+i a \tan (c+d x))^3}{3 d}+\frac {4 i a^3 (a+i a \tan (c+d x))^5}{5 d}+\frac {i a^2 (a+i a \tan (c+d x))^6}{3 d}+\frac {i a (a+i a \tan (c+d x))^7}{7 d}+\frac {2 i \left (a^2+i a^2 \tan (c+d x)\right )^4}{d}+\frac {16 i \left (a^4+i a^4 \tan (c+d x)\right )^2}{d}+\left (64 a^6\right ) \int (a+i a \tan (c+d x))^2 \, dx\\ &=128 a^8 x-\frac {64 a^8 \tan (c+d x)}{d}+\frac {16 i a^5 (a+i a \tan (c+d x))^3}{3 d}+\frac {4 i a^3 (a+i a \tan (c+d x))^5}{5 d}+\frac {i a^2 (a+i a \tan (c+d x))^6}{3 d}+\frac {i a (a+i a \tan (c+d x))^7}{7 d}+\frac {2 i \left (a^2+i a^2 \tan (c+d x)\right )^4}{d}+\frac {16 i \left (a^4+i a^4 \tan (c+d x)\right )^2}{d}+\left (128 i a^8\right ) \int \tan (c+d x) \, dx\\ &=128 a^8 x-\frac {128 i a^8 \log (\cos (c+d x))}{d}-\frac {64 a^8 \tan (c+d x)}{d}+\frac {16 i a^5 (a+i a \tan (c+d x))^3}{3 d}+\frac {4 i a^3 (a+i a \tan (c+d x))^5}{5 d}+\frac {i a^2 (a+i a \tan (c+d x))^6}{3 d}+\frac {i a (a+i a \tan (c+d x))^7}{7 d}+\frac {2 i \left (a^2+i a^2 \tan (c+d x)\right )^4}{d}+\frac {16 i \left (a^4+i a^4 \tan (c+d x)\right )^2}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 2.51, size = 383, normalized size = 1.92 \begin {gather*} \frac {a^8 \sec (c) \sec ^7(c+d x) \left (70 \cos (d x) \left (-139 i+210 d x-105 i \log \left (\cos ^2(c+d x)\right )\right )+70 \cos (2 c+d x) \left (-139 i+210 d x-105 i \log \left (\cos ^2(c+d x)\right )\right )+3 \left (-420 i \cos (4 c+5 d x)+980 d x \cos (4 c+5 d x)-420 i \cos (6 c+5 d x)+980 d x \cos (6 c+5 d x)+140 d x \cos (6 c+7 d x)+140 d x \cos (8 c+7 d x)+70 \cos (2 c+3 d x) \left (-25 i+42 d x-21 i \log \left (\cos ^2(c+d x)\right )\right )+70 \cos (4 c+3 d x) \left (-25 i+42 d x-21 i \log \left (\cos ^2(c+d x)\right )\right )-490 i \cos (4 c+5 d x) \log \left (\cos ^2(c+d x)\right )-490 i \cos (6 c+5 d x) \log \left (\cos ^2(c+d x)\right )-70 i \cos (6 c+7 d x) \log \left (\cos ^2(c+d x)\right )-70 i \cos (8 c+7 d x) \log \left (\cos ^2(c+d x)\right )-6965 \sin (d x)+5740 \sin (2 c+d x)-4963 \sin (2 c+3 d x)+2660 \sin (4 c+3 d x)-1981 \sin (4 c+5 d x)+560 \sin (6 c+5 d x)-363 \sin (6 c+7 d x)\right )\right )}{420 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.06, size = 103, normalized size = 0.52
method | result | size |
derivativedivides | \(\frac {a^{8} \left (-127 \tan \left (d x +c \right )+\frac {\left (\tan ^{7}\left (d x +c \right )\right )}{7}-\frac {4 i \left (\tan ^{6}\left (d x +c \right )\right )}{3}-\frac {29 \left (\tan ^{5}\left (d x +c \right )\right )}{5}+16 i \left (\tan ^{4}\left (d x +c \right )\right )+33 \left (\tan ^{3}\left (d x +c \right )\right )-60 i \left (\tan ^{2}\left (d x +c \right )\right )+64 i \ln \left (1+\tan ^{2}\left (d x +c \right )\right )+128 \arctan \left (\tan \left (d x +c \right )\right )\right )}{d}\) | \(103\) |
default | \(\frac {a^{8} \left (-127 \tan \left (d x +c \right )+\frac {\left (\tan ^{7}\left (d x +c \right )\right )}{7}-\frac {4 i \left (\tan ^{6}\left (d x +c \right )\right )}{3}-\frac {29 \left (\tan ^{5}\left (d x +c \right )\right )}{5}+16 i \left (\tan ^{4}\left (d x +c \right )\right )+33 \left (\tan ^{3}\left (d x +c \right )\right )-60 i \left (\tan ^{2}\left (d x +c \right )\right )+64 i \ln \left (1+\tan ^{2}\left (d x +c \right )\right )+128 \arctan \left (\tan \left (d x +c \right )\right )\right )}{d}\) | \(103\) |
risch | \(-\frac {256 a^{8} c}{d}-\frac {32 i a^{8} \left (2940 \,{\mathrm e}^{12 i \left (d x +c \right )}+13230 \,{\mathrm e}^{10 i \left (d x +c \right )}+26950 \,{\mathrm e}^{8 i \left (d x +c \right )}+30625 \,{\mathrm e}^{6 i \left (d x +c \right )}+20139 \,{\mathrm e}^{4 i \left (d x +c \right )}+7203 \,{\mathrm e}^{2 i \left (d x +c \right )}+1089\right )}{105 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{7}}-\frac {128 i a^{8} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{d}\) | \(122\) |
norman | \(128 a^{8} x -\frac {127 a^{8} \tan \left (d x +c \right )}{d}+\frac {33 a^{8} \left (\tan ^{3}\left (d x +c \right )\right )}{d}-\frac {29 a^{8} \left (\tan ^{5}\left (d x +c \right )\right )}{5 d}+\frac {a^{8} \left (\tan ^{7}\left (d x +c \right )\right )}{7 d}-\frac {60 i a^{8} \left (\tan ^{2}\left (d x +c \right )\right )}{d}+\frac {16 i a^{8} \left (\tan ^{4}\left (d x +c \right )\right )}{d}-\frac {4 i a^{8} \left (\tan ^{6}\left (d x +c \right )\right )}{3 d}+\frac {64 i a^{8} \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{d}\) | \(141\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.51, size = 121, normalized size = 0.60 \begin {gather*} \frac {15 \, a^{8} \tan \left (d x + c\right )^{7} - 140 i \, a^{8} \tan \left (d x + c\right )^{6} - 609 \, a^{8} \tan \left (d x + c\right )^{5} + 1680 i \, a^{8} \tan \left (d x + c\right )^{4} + 3465 \, a^{8} \tan \left (d x + c\right )^{3} - 6300 i \, a^{8} \tan \left (d x + c\right )^{2} + 13440 \, {\left (d x + c\right )} a^{8} + 6720 i \, a^{8} \log \left (\tan \left (d x + c\right )^{2} + 1\right ) - 13335 \, a^{8} \tan \left (d x + c\right )}{105 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.35, size = 297, normalized size = 1.48 \begin {gather*} -\frac {32 \, {\left (2940 i \, a^{8} e^{\left (12 i \, d x + 12 i \, c\right )} + 13230 i \, a^{8} e^{\left (10 i \, d x + 10 i \, c\right )} + 26950 i \, a^{8} e^{\left (8 i \, d x + 8 i \, c\right )} + 30625 i \, a^{8} e^{\left (6 i \, d x + 6 i \, c\right )} + 20139 i \, a^{8} e^{\left (4 i \, d x + 4 i \, c\right )} + 7203 i \, a^{8} e^{\left (2 i \, d x + 2 i \, c\right )} + 1089 i \, a^{8} + 420 \, {\left (i \, a^{8} e^{\left (14 i \, d x + 14 i \, c\right )} + 7 i \, a^{8} e^{\left (12 i \, d x + 12 i \, c\right )} + 21 i \, a^{8} e^{\left (10 i \, d x + 10 i \, c\right )} + 35 i \, a^{8} e^{\left (8 i \, d x + 8 i \, c\right )} + 35 i \, a^{8} e^{\left (6 i \, d x + 6 i \, c\right )} + 21 i \, a^{8} e^{\left (4 i \, d x + 4 i \, c\right )} + 7 i \, a^{8} e^{\left (2 i \, d x + 2 i \, c\right )} + i \, a^{8}\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )\right )}}{105 \, {\left (d e^{\left (14 i \, d x + 14 i \, c\right )} + 7 \, d e^{\left (12 i \, d x + 12 i \, c\right )} + 21 \, d e^{\left (10 i \, d x + 10 i \, c\right )} + 35 \, d e^{\left (8 i \, d x + 8 i \, c\right )} + 35 \, d e^{\left (6 i \, d x + 6 i \, c\right )} + 21 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 7 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.41, size = 301, normalized size = 1.50 \begin {gather*} - \frac {128 i a^{8} \log {\left (e^{2 i d x} + e^{- 2 i c} \right )}}{d} + \frac {- 94080 i a^{8} e^{12 i c} e^{12 i d x} - 423360 i a^{8} e^{10 i c} e^{10 i d x} - 862400 i a^{8} e^{8 i c} e^{8 i d x} - 980000 i a^{8} e^{6 i c} e^{6 i d x} - 644448 i a^{8} e^{4 i c} e^{4 i d x} - 230496 i a^{8} e^{2 i c} e^{2 i d x} - 34848 i a^{8}}{105 d e^{14 i c} e^{14 i d x} + 735 d e^{12 i c} e^{12 i d x} + 2205 d e^{10 i c} e^{10 i d x} + 3675 d e^{8 i c} e^{8 i d x} + 3675 d e^{6 i c} e^{6 i d x} + 2205 d e^{4 i c} e^{4 i d x} + 735 d e^{2 i c} e^{2 i d x} + 105 d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 378 vs. \(2 (166) = 332\).
time = 0.70, size = 378, normalized size = 1.89 \begin {gather*} -\frac {32 \, {\left (420 i \, a^{8} e^{\left (14 i \, d x + 14 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + 2940 i \, a^{8} e^{\left (12 i \, d x + 12 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + 8820 i \, a^{8} e^{\left (10 i \, d x + 10 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + 14700 i \, a^{8} e^{\left (8 i \, d x + 8 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + 14700 i \, a^{8} e^{\left (6 i \, d x + 6 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + 8820 i \, a^{8} e^{\left (4 i \, d x + 4 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + 2940 i \, a^{8} e^{\left (2 i \, d x + 2 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + 2940 i \, a^{8} e^{\left (12 i \, d x + 12 i \, c\right )} + 13230 i \, a^{8} e^{\left (10 i \, d x + 10 i \, c\right )} + 26950 i \, a^{8} e^{\left (8 i \, d x + 8 i \, c\right )} + 30625 i \, a^{8} e^{\left (6 i \, d x + 6 i \, c\right )} + 20139 i \, a^{8} e^{\left (4 i \, d x + 4 i \, c\right )} + 7203 i \, a^{8} e^{\left (2 i \, d x + 2 i \, c\right )} + 420 i \, a^{8} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) + 1089 i \, a^{8}\right )}}{105 \, {\left (d e^{\left (14 i \, d x + 14 i \, c\right )} + 7 \, d e^{\left (12 i \, d x + 12 i \, c\right )} + 21 \, d e^{\left (10 i \, d x + 10 i \, c\right )} + 35 \, d e^{\left (8 i \, d x + 8 i \, c\right )} + 35 \, d e^{\left (6 i \, d x + 6 i \, c\right )} + 21 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 7 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.40, size = 113, normalized size = 0.56 \begin {gather*} \frac {33\,a^8\,{\mathrm {tan}\left (c+d\,x\right )}^3-127\,a^8\,\mathrm {tan}\left (c+d\,x\right )-\frac {29\,a^8\,{\mathrm {tan}\left (c+d\,x\right )}^5}{5}+\frac {a^8\,{\mathrm {tan}\left (c+d\,x\right )}^7}{7}+a^8\,\ln \left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )\,128{}\mathrm {i}-a^8\,{\mathrm {tan}\left (c+d\,x\right )}^2\,60{}\mathrm {i}+a^8\,{\mathrm {tan}\left (c+d\,x\right )}^4\,16{}\mathrm {i}-\frac {a^8\,{\mathrm {tan}\left (c+d\,x\right )}^6\,4{}\mathrm {i}}{3}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________